﻿<Page
    x:Class="TestApp.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:TestApp"
    xmlns:mcc="using:Midgard.CompositeCollection"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">
    <Page.Resources>
        <local:Viewmodel x:Key="Object1"/>
    </Page.Resources>
    <Page.DataContext>
        <StaticResource ResourceKey="Object1"/>
    </Page.DataContext>

    <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
        <Grid.RowDefinitions>
            <RowDefinition Height="*"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <ListBox Name="list" Margin="30" >
            <ListBox.ItemsSource>
                <mcc:CompositeCollection>
                    <mcc:CompositeCollection.Composition>
                        <mcc:CollectionContainer Collection="{Binding Back, Source={StaticResource Object1}}" />
                        <ListBoxItem>uaeuia</ListBoxItem>
                    </mcc:CompositeCollection.Composition>
                </mcc:CompositeCollection>
            </ListBox.ItemsSource>
        </ListBox>
        <Button Content="Add" Command="{Binding Add}" Grid.Row="1"/>
    </Grid>
</Page>
